package com.nbsaas.boot.manufacturing.rest.convert;

import com.nbsaas.boot.manufacturing.data.entity.WorkCenter;
import com.nbsaas.boot.manufacturing.api.domain.request.WorkCenterRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 工作中心请求对象转换成实体对象
*/

public class WorkCenterEntityConvert  implements Converter<WorkCenter, WorkCenterRequest> {

    @Override
    public WorkCenter convert(WorkCenterRequest source) {
        WorkCenter result = new WorkCenter();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

